<%@ taglib prefix="s" uri="/struts-tags" %>

<html>
	<head>
		<link rel="stylesheet" type="text/css" href="css/tabsheets.css" />
		<link rel="stylesheet" type="text/css" href="css/header.css" />
		<script type="text/javascript" src="javascript/tabsheets.js"></script>
	</head>
<body>

<!-- HEADER-BEGIN -->
<table id="header">
	<tr>
		<td id="logo">
			<div align="center">
				<table id="epam" >
					<tr>
						<td><span id="title">EPAM Training Portal</span></td>
						<td align=center>
							<!--    A   U   T   O   R   I   Z   E   D    A   D   M   I   N   -->
								<table id="login_table"><tr><td id="title_little">	
								Welcome, <s:property value="session.user.firstName"/> 
										 <s:property value="session.user.lastName"/>!
								&nbsp;&nbsp;&nbsp;&nbsp;
								<s:url action="logout" id="url"/>
								<s:a href="%{url}">LogOut</s:a>
								</td></tr></table>
							<!----------------------------------------------------------------->
						</td>
					</tr>
				</table>
			</div>	
		</td>
	</tr>
	<tr>
		<td>
			<div align="center">
				<table id="table-menu">
					<tr>
						<td>
							<div id="css-menu">
								<ul>
									<li><a href="<s:url action='index'/>">Home</a></li>
									<li><a href="<s:url action='trainers-list'/>">Trainers</a></li>
								</ul>
							</div>
						</td>
					</tr>
				</table>
			</div>
		</td>
	</tr>
</table>
<!-- HEADER-END -->

<!-- CONTENT-BEGIN -->

<div style="background: #eeeeee; padding: 0em;">
	<div align="center">
		<s:form action="update-trainer">
		<s:if test="currentLector != null">
			<s:hidden name="id" value="%{currentLector.id}"/>
		</s:if>
		<table width=50% border=1 bgcolor=#dddddd cellspacing=0 cellpadding=40><tr><td>    
			<table width=100% border=0 cellpadding=15>
				<tr>
					<td width=50%>First Name</td>
					<td><s:textfield name="firstname" size="20" value="%{currentLector.firstName}"/></td>
				</tr>
				<tr>
					<td>Last Name</td>
					<td><s:textfield name="lastname" size="20" value="%{currentLector.lastName}"/></td>
				</tr>
				<tr>
					<td>Email</td>
					<td>
						<s:textfield name="login" size="20" value="%{currentLector.login}" disabled="%{currentLector != null}"/></td>
				</tr>
				<tr>
					<td>Discipline</td>
					<td>
						<select name="course">
							<s:iterator value="courseList" var="item" status="stat">
								<option value="<s:property value='#stat.index'/>" <s:property value="(#stat.index eq currentLector.course.id)?'selected':''"/>>
									<s:property value="#item"/>
								</option>
							</s:iterator>
						</select>
					</td>
				</tr>
				<tr>
					<td>Is Active</td>
					<td><s:checkbox name="isactive" value="currentLector.isActive"/></td>
				</tr>
				<tr>
					<td align=right><s:submit value="Save"/></td>
					<td><s:reset/></td>
				</tr>
			</table>
		</td></tr>
		</table>
		</s:form>
	</div>
</div>


<!-- CONTENT-END -->
</body>
</html>